package com.albaba.designpattern.chain_of_responsibility.text_002;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;

/**
 * @author zx
 * @version 1.0
 * @description TODO
 * @date 2025/2/24 22:08
 */
public class Client {

    static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    public static void main(String[] args) throws ParseException {
        AuthController authController = new AuthController();
        Date date = sdf.parse("2025-02-25 00:00:00");
        // 模拟
        AuthInfo authInfo1 = authController.doAuth("研发小周", "100000001", date);
        System.out.println("当前审核状态：" + authInfo1.getInfo());

        AuthService.auth("100013", "100000001");
        System.out.println("三级审批负责人审批完成,审批人：王工");

        System.out.println("========================================================================");

        AuthInfo authInfo2 = authController.doAuth("研发小周", "100000001", date);
        System.out.println("二级审批人 当前审核状态：" + authInfo2.getInfo());

        AuthService.auth("100013", "100000001");
        System.out.println("二级审批负责人审批完成,审批人：周经理");

        System.out.println("========================================================================");

        AuthInfo authInfo3 = authController.doAuth("研发小周", "100000001", date);
        System.out.println("一级审批人 当前审核状态：" + authInfo3.getInfo());

        AuthService.auth("100013", "100000001");
        System.out.println("一级审批负责人审批完成,审批人：罗总");


    }
}
